// /**
//  * api接口统一管理
//  */
import { get, post } from './http'

//=============================================================>网课模块

//登录(手机验证码登录)
export const phone_login = p =>post('/user/phone_login',p)
//登录(账号秘密登录)
export const user_login = p =>post('/user/login',p)

//获取机构信息
export const getOrg2 = () => get('action/org_list');

//获取机构信息根据org_code
export const getOrg = p => get('/action/org_detail',p);

//首次报名
export const firstsign = p => post('action/first_sign_test',p);

//n次报名
export const get_n_Org = p =>post('action/n_sign_test',p)
//发送验证码
export const send_sms = p =>post('/user/send_sms',p)
//上传证件照
export const upload = p =>post('/action/test_img',p)//{photo:base64图片}
//报考补考
// export const exam_reg = p =>post('/action/exam_reg_test',p)

//获取全部报考记录
export const exam_record = () =>get('/action/exam_record')

//根据科目ID获取报考记录
export const exam_recordByCourse = p =>get('/action/exam_record?course_id='+p)

//获取档案
export const getProfile = () =>get('/action/profile')

//获取学员档案
export const studentList = p =>post('/action/search',p)

//获取科目
export const courselist = () =>get('/action/course_list')

//获取机构列表(管理员)
export const org_list = () =>get('action/org_list')

//审核
export const check = p =>post('/action/check',p)

//根据科目机构获取档案
export const getProfileBy = p =>get(`/action/profile?org=${p.org_code}&course_id=${p.course_id}`)

//编辑资料
export const editContent = p =>post('/action/edit_test',p) //pid 档案id 必填

//导出数据
export const downCsv = p =>post('/action/profile_to_csv',p)

//获取考试时间
export const examDate = () =>get('/action/exam_date_list');
//获取考试时间
export const examDateByCourseId = p =>get('/action/exam_date?course='+p);

//报考记录
export const scoreList = () =>get('/action/score_list');

//实名认证
export const getPersonVerifyUrl = p =>post('/action/get_person_verify_url',p)

//获取实名认证信息
export const getPersonUserInfo = p =>post('/action/get_person_cert_info',p)

//合同填充
export const generateContract = p =>post('/action/generate_contract',p);

//查看合同
export const viewContract = p =>get('/action/view_contract',p);

//导入CSV文件
export const updateUserPool = p =>post('/action/update_user_pool',p);

//实名认证2
export const createUser = p =>post('/action/create_user_test',p)

//合同签署提交合同号
export const signContract = p =>post('/action/sign_contract',p)

//获取公告集合
export const noticeList = () =>get('/action/user_notice')

//添加备注信息
export const addDetail = p =>post('/action/edit_note',p)

//审核日志
export const stateLog = p =>get('/action/audit_log',p)

//修改密码
export const forgetPass = p => post('/user/forget_pass',p)

//实名认证回调
export const cert_callback = (data) => post('/action/cert_callback', data)
//签署认证回调
export const signed_callback = (data) => post('/action/signed_callback', data)
//获取实名认证地址
export const get_person_verify_url = (params) => get('/action/get_person_verify_url', params)
//获取用户信息
export const get_user_info = () => get('/action/user_info')

export const verify_create_user = () => get('/action/verify_create_user')

//用户获取档案表
export const profile = (params) => get('/action/profile',params)

//获取实名认证后的信息
export const get_person_cert_info = () => get('/action/get_person_cert_info')

//用户报名提交表单
export const sign_up = (params) => post('/action/sign_up',params)

//获取考试时间
export const exam_data_list = (course_id) => get('/action/exam_date_list', {course:course_id,active:true})

//用户报考科目
export const exam_reg = (params) => post('/action/exam_reg',params)

//用户编辑资料
export const editData = (params) => post('/action/edit',params)

//填充一份合同
export const generate_contract = (params) => post('/action/generate_contract',params)

//签署合同
export const userExtSign = (params) => post('/action/user_ext_sign',params)

//学员获取报考记录
export const userExamReacord = (params) => get('/action/user_exam_reacord',params)

//管理员 批量审核操作
export const batchCheck = (params) => post('/action/batch_check',params)

//修改密码
export const forget_password = (params) => post('/user/forget_password',params)

//省市区接口数据获取
// export const area_data = (params) => get('/action/area_data',params)

export const getImg = (url) =>get(url);


